<%@ page import="org.apache.commons.lang3.StringUtils"%>
<%@ page import="com.model.Vote"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ include file="user-index-head.jsp"%> 
<%
	String str = (String)request.getAttribute("ret");
	if(!StringUtils.isEmpty(str)){
		out.print("<script>alert('"+str+"');</script>");
	}
%>
<link rel="stylesheet" href="<%=path %>/js/kindeditor/themes/default/default.css" />
<link rel="stylesheet" href="<%=path %>/js/kindeditor/plugins/code/prettify.css" />
<script src="<%=path %>/js/kindeditor/kindeditor.js" type="text/javascript"></script>
<script src="<%=path %>/js/kindeditor/lang/zh_CN.js" type="text/javascript"></script>
<script src="<%=path %>/js/kindeditor/plugins/code/prettify.js" type="text/javascript"></script>
<script src="<%=path %>/js/date/WdatePicker.js"></script>
<script src="<%=path %>/js/module/vote.js"></script>
<script>

var editor;
KindEditor.ready(function(K) {
editor = K.create('#info', {
resizeType : 1,
allowPreviewEmoticons : false,
allowImageUpload : false,
items : [
'source','undo','plainpaste','wordpaste','clearhtml','quickformat','selectall','fullscreen','fontname', 'fontsize','subscript','superscript','indent','outdent','|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline','hr']
});

});
</script>
<div class="content">

<div class="cLineB">
  <h4>文本投票设置 </h4><a href="<%=path %>/user/vote!index.do" class="right btnGrayS vm" style="margin-top:-27px">返回</a>
 </div>
         
         <div class="msgWrap bgfc">
  <form class="form" method="post" action="<%=path %>/user/vote!addTo.do" target="_top" enctype="multipart/form-data">	 
<table class="userinfoArea" style=" margin:0;" border="0" cellspacing="0" cellpadding="0" width="100%"><tbody>

                            <tr>
<th width="120">关键词：</th>
<td><input type="text" name="keyword.keyword" value="" class="px" style="width:550px;"><br><span class="red">只能写一个关键词,功能面板必须开启投票</span></td>
</tr>
                            <tr>
<th width="120">投票标题：</th>
<td><input type="text" name="keyword.vote.title" value="" class="px" style="width:550px;"></td>
</tr>
<tr>
<th>投票图片：</th>
<td><input type="text" name="keyword.vote.imgUrl" value="" class="px" style="width:550px;"> 填写图片外链地址，大小为720x400</td>
</tr>
                                <tr>
<th>图片显示：</th>
<td>
<label>
	<input type="radio" name="keyword.vote.showInPage" value="1" checked id="showpic1">
	显示在投票页面
</label>
<label>
	<input type="radio" name="keyword.vote.showInPage" id="showpic2" value="0">
	不显示在投票页面
</label>
                                    
</td>
</tr>
<tr>
<th valign="top">投票说明：</th>
<td valign="top"><textarea class="px" id="description" name="keyword.vote.description" style="width: 560px; height: 120px; display: ;"></textarea></td>
</tr>
<tr>
<th valign="top">投票选项：</th>
<td valign="top"><div class="bdrcontent">

<div id="div_ptype">
<table class="ListProduct" border="0" cellspacing="0" cellpadding="0" width="70%">
	<tr class="norightborder">
		<td><strong>选项标题</strong></td>
	   	<td width="58px"><strong>排序</strong></td>                  
		<td style="width:82px">
			<button type="button" id="insert" name="insert" class="btnGreen">添加</button>
		</td>
	</tr>
	<tr>
		<td>
	   		<input type="text" name="keyword.vote.voteOptionList[0].content" value="" class="px" style="width:350px;">
	   	</td>
	   	<td>
	   		<input type="text" name="keyword.vote.voteOptionList[0].sort" value="1" class="px" style="width:35px;" readonly="readonly">
	   	</td>
	   	<td>
	   		<button type="button" class="btnGreen" id="delete1" name="delete1">删除</button>
	   	</td>
	</tr>	
	<tr id="optionRow">
		<td>
	   		<input type="text" name="keyword.vote.voteOptionList[1].content" value="" class="px" style="width:350px;">
	   	</td>
	   	<td>
	   		<input type="text" name="keyword.vote.voteOptionList[1].sort" value="2" class="px" style="width:35px;" readonly="readonly">
	   	</td>
	   	<td>
	   		<button type="button" class="btnGreen" id="delete2" name="delete2">删除</button>
	   	</td>
	</tr>
</table>
			
</div>
</div>

</td>
</tr>
<tr>
<th>单选/多选：</th>
<td><p style="width: 120px; float: left; display: block; line-height: 32px; height: 32px;">
<label>
<input name="keyword.vote.singleSelect" type="radio" onclick="document.getElementById('cknums').style.display='none';" id="RadioGroup1_0" value="0" checked="checked">
单选</label>
　
<label>
<input type="radio" name="keyword.vote.singleSelect" onclick="document.getElementById('cknums').style.display='block';" value="1" id="RadioGroup1_1">
多选</label></p>
<p id="cknums" style="display:none;width:200px; float: left">
<input name="keyword.vote.maxSelect" class="px" size="4" type="text" value="2">多项最多选多少项
</p></td>
</tr>
                          
<tr>
<th>截至时间：</th>
<td>
<input type="input" class="px" id="startTime" name="keyword.vote.startTime" value="" onClick="WdatePicker()">
到
<input type="input" class="px" id="endTime"  name="keyword.vote.endTime" value="" onClick="WdatePicker()"></td>
</tr>
<tr>
<th>投票结果：</th>
<td><label>
<input type="radio" name="keyword.vote.showResultModel" id="RadioGroup2_1" value="<%=Vote.SHOW_RESULT_MODEL.SHOW_BEFORE_VOTE %>" >
投票前可见</label>
    
<label>
<input type="radio" name="keyword.vote.showResultModel" id="RadioGroup2_0" value="<%=Vote.SHOW_RESULT_MODEL.SHOW_AFTER_VOTE %>" checked="checked">
投票后可见</label>
                                    
<label>
<input type="radio" name="keyword.vote.showResultModel" id="RadioGroup2_2" value="<%=Vote.SHOW_RESULT_MODEL.SHOW_END_OF_VOTE %>">
投票结束可见</label></td>
</tr>
<tr>
<th>&nbsp;</th>
<td><button type="submit" name="button" class="btnGreen">保存</button>
<a href="<%=path %>/user/vote!add.do?type=text" class="btnGray vm">取消</a></td>
</tr>
</tbody>
</table>

</form>
  </div> 
 
  
        </div>
<include file="Public:footer"/>